package com.load.utils;

import java.util.Map;

import com.database.objects.Status;

public class MathUtil {

	public static Status max(Map<Status, Integer> statusMap) {
		Integer valueMax = Integer.MIN_VALUE;
		Status statusMax = Status.UNKNOWN;
		for (Status status : statusMap.keySet()) {
			Integer element = statusMap.get(status);
			if (element.compareTo(valueMax) > 0) {
				valueMax = element;
				statusMax = status;
			}
		}
		return statusMax;
	}
}
